/*
*  Copyright 2019-2023 Zheng Jie
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*
*  http://www.apache.org/licenses/LICENSE-2.0
*
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*  See the License for the specific language governing permissions and
*  limitations under the License.
*/
package me.zhengjie.modules.system.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import cn.hutool.core.bean.BeanUtil;
import io.swagger.annotations.ApiModelProperty;
import cn.hutool.core.bean.copier.CopyOptions;

import java.io.Serializable;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import me.zhengjie.base.BaseEntity;

/**
* @description /
* @author pysduck
* @date 2024-09-03
**/
@Data
@TableName("sys_process_define")
public class ProcessDefine extends BaseEntity implements Serializable {

    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value = "唯一主键")
    private Integer id;

    @ApiModelProperty(value = "流程名")
    private String flowName;

    @ApiModelProperty(value = "流程设计json对象")
    private String orginaldata;

    @ApiModelProperty(value = "定义版本")
    private Integer version;

    @ApiModelProperty(value = "流程类型ID")
    private Integer flowTypeId;

    @ApiModelProperty(value = "流程设计ID")
    private Integer processDesignId;

    @ApiModelProperty(value = "流程ID")
    private String flowId;

    @ApiModelProperty(value = "启用状态")
    private Integer isStart;

    @ApiModelProperty(value = "状态")
    private Integer status;

    @ApiModelProperty(value = "流程类型")
    @TableField(exist = false)
    private FlowType flowTypes;

    public void copy(ProcessDefine source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
}
